package com.example.user.service;

import com.example.event.GenericEvent;
import com.example.model.entity.user.User;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
public class UserModuleListener {
    @EventListener
    public void handleUserCreated(GenericEvent<User> event) {
        User user = event.getPayload();
        System.out.println("用户模块：保存用户信息");
        // 保存用户到数据库
    }
}